home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / refex / ex93.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  471 b   |  22 lines

  1. Program Example93;
  2.  
  3. { Program to demonstrate the Hash function. }
  4. {$Mode Delphi}
  5.  
  6. ResourceString
  7.  
  8.   First  = 'First string';
  9.   Second = 'Second String';
  10.  
  11. Var I,J : Longint;
  12.  
  13. begin
  14.   For I:=0 to ResourceStringTableCount-1 do
  15.     For J:=0 to ResourceStringCount(i)-1 do
  16.       If Hash(GetResourceStringDefaultValue(I,J))
  17.         <>GetResourceStringHash(I,J) then
  18.         Writeln ('Hash mismatch at ',I,',',J)
  19.       else
  20.         Writeln ('Hash (',I,',',J,') matches.');
  21. end.
  22.